import { Question } from "../interface";

const questions: Question[] = [
    {
        question: "下列哪个标签不属于HTML5语义化标签？",
        radios: [
            "<header>",
            "<section>",
            "<bold>",
            "<nav>"
        ],
        desc: "<bold>是过时的样式标签，应使用<strong>替代"
    },
    {
        question: "关于<meta>标签的正确用法是：",
        radios: [
            "<meta name='viewport' content='width=device-width'>",
            "<meta http-equiv='Content-Type' content='text/javascript'>",
            "<meta charset='CSS'>",
            "<meta name='description' type='text/plain'>"
        ],
        desc: "viewport meta标签是响应式设计的基础配置"
    },
    {
        question: "下列哪些标签一般包含在<head>内？",
        radios: [
            "<title>",
            "<style>",
            "<base>",
            "<dialog>"
        ],
        muti: true,
        desc: "<dialog>是页面内容标签，其他三个标签应放在<head>中"
    },
    {
        question: "关于<a>标签的合法属性是：",
        radios: [
            "download",
            "prefetch",
            "autoplay",
            "defer"
        ],
        desc: "download属性用于指定链接为下载资源，其他属性属于其他标签"
    },
    {
        question: "下列嵌套关系正确的是：",
        radios: [
            "<ul><li><p>文本</p></li></ul>",
            "<p><div>区块</div></p>",
            "<table><tr><span>单元格</span></tr></table>",
            "<h1><a href='#'>标题链接</h1></a>"
        ],
        desc: "<ul>内<li>可以包含块级元素<p>，其他选项存在标签闭合或嵌套错误"
    },
    {
        question: "哪个标签不能包含在<body>中？",
        radios: [
            "<template>",
            "<main>",
            "<head>",
            "<article>"
        ],
        desc: "<head>标签必须独立于<body>存在"
    },
    {
        question: "关于<img>标签的强制属性是：",
        radios: [
            "src",
            "alt",
            "width",
            "loading"
        ],
        desc: "HTML规范要求<img>必须包含alt属性（可为空字符串）"
    },
    {
        question: "下列哪些是合法的表格结构？",
        radios: [
            "<table><thead><tr><th></th></tr></thead>",
            "<table><colgroup><td></td></colgroup>",
            "<table><tr><caption>标题</caption></tr>",
            "<table><tbody><col></col></tbody>"
        ],
        muti: true,
        desc: "只有第一个选项符合<table><thead><tr><th>标准结构"
    },
    {
        question: "关于<form>标签的enctype属性，错误的是：",
        radios: [
            "application/x-www-form-urlencoded",
            "multipart/form-data",
            "text/plain",
            "application/json"
        ],
        desc: "HTML标准不支持application/json作为enctype值"
    },
    {
        question: "下列哪个标签不能包含交互内容？",
        radios: [
            "<details>",
            "<label>",
            "<fieldset>",
            "<noscript>"
        ],
        desc: "<noscript>仅在脚本禁用时显示静态内容"
    },
    {
        question: "关于<video>标签的合法子标签是：",
        radios: [
            "<source>",
            "<track>",
            "<poster>",
            "<controls>"
        ],
        muti: true,
        desc: "<poster>是属性不是标签，<controls>是布尔属性"
    },
    {
        question: "下列哪个属性在所有HTML元素上都是合法的？",
        radios: [
            "class",
            "href",
            "src",
            "action"
        ],
        desc: "class是全局属性，其他属性仅限特定标签使用"
    },
    {
        question: "关于<iframe>的安全限制，正确的是：",
        radios: [
            "sandbox属性可禁用脚本",
            "allowfullscreen需要权限",
            "同源策略限制跨域访问",
            "srcdoc会继承父页面样式"
        ],
        muti: true,
        desc: "所有选项都是<iframe>的安全相关特性"
    },
    {
        question: "下列哪些标签不需要闭合？",
        radios: [
            "<br>",
            "<hr>",
            "<input>",
            "<link>"
        ],
        muti: true,
        desc: "这些标签都是void elements，HTML5规范允许不闭合"
    },
    {
        question: "关于<canvas>的width/height属性，错误的是：",
        radios: [
            "只能用像素值定义",
            "影响绘制坐标系大小",
            "与CSS设置的宽高效果相同",
            "默认值300x150"
        ],
        desc: "canvas的HTML属性与CSS宽高作用不同：前者设置画布分辨率，后者设置显示尺寸"
    },
    {
        question: "下列哪个标签的type属性值不存在？",
        radios: [
            "<input type='color'>",
            "<button type='reset'>",
            "<script type='module'>",
            "<style type='text/css'>"
        ],
        desc: "HTML5已弃用<style>的type属性，默认就是text/css"
    },
    {
        question: "关于<datalist>与<select>的区别，正确的是：",
        radios: [
            "<datalist>支持用户自定义输入",
            "<select>可以多级嵌套",
            "<datalist>需要配合<input>使用",
            "<select>不支持CSS样式"
        ],
        muti: true,
        desc: "<select>也支持CSS样式，但确实不能像<datalist>那样允许自定义输入"
    },
    {
        question: "下列ARIA角色标注错误的是：",
        radios: [
            "role='button'",
            "role='header'",
            "role='main'",
            "role='navigation'"
        ],
        desc: "应使用role='heading'而非'header'"
    },
    {
        question: "关于Web Components的标签规范，错误的是：",
        radios: [
            "自定义标签必须包含连字符",
            "可以继承原生标签特性",
            "<template>内容不会立即渲染",
            "<slot>只能在Shadow DOM中使用"
        ],
        desc: "<slot>也可以在常规DOM中使用，但通常配合Shadow DOM"
    },
    {
        question: "以下文档声明正确的是：",
        radios: [
            "<!doctype html>",
            "<!DOCTYPE HTML 4.01>",
            "<!DOCTYPE XHTML 1.0>",
            "<!DOCTYPE XHTML 1.0 Frameset>"
        ],
        desc: "HTML5的doctype极简，html标签的大小写不敏感",
    },
];;

export default questions;